#include "fxcc/core/BaseImporter.h"
#include "fxcc/mono/CSharpMetaCacheFile.h"

template<>
void fxcc::yml::Serializer::Encode<CSharpMetaCache>(YAML::Node& node, const CSharpMetaCache& inst)
{
	auto func = [=](const MetaMapIndex& index) {
		return fs::exists(index.m_NativeFile); };

	SetArrayVariable<MetaMapIndex>(node, "m_DllMetas", inst.m_DllMetas, func);

}


template<>
bool fxcc::yml::Serializer::Decode<CSharpMetaCache>(const YAML::Node& node, CSharpMetaCache& inst)
{
	GetArrayVariable<MetaMapIndex>(node, "m_DllMetas", inst.m_DllMetas);
	return true;
}